//
//  HPYNetworkTools.swift
//  SwiftVVBo
//
//  Created by hepeiyong on 16/8/14.
//  Copyright © 2016年 hpyhn. All rights reserved.
//

import UIKit
import SDWebImage
extension UIImageView{
    // 便利构造函数
    convenience init(imgName: String){
        self.init(image: UIImage(named: imgName))
    }
    // 对SDWebImage 封装一次
    func hm_setImageWithString(imgName: String?,placeholderImgName: String){
        self.sd_setImageWithURL(NSURL(string: imgName ?? ""), placeholderImage: UIImage(named: placeholderImgName))
    }
}
